package com.ruoyi.monitor.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.monitor.mapper.MonitorVideoMapper;
import com.ruoyi.monitor.domain.MonitorVideo;
import com.ruoyi.monitor.service.IMonitorVideoService;

/**
 * 监控视频Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-16
 */
@Service
public class MonitorVideoServiceImpl implements IMonitorVideoService 
{
    @Autowired
    private MonitorVideoMapper monitorVideoMapper;

    /**
     * 查询监控视频
     * 
     * @param videoId 监控视频主键
     * @return 监控视频
     */
    @Override
    public MonitorVideo selectMonitorVideoByVideoId(Integer videoId)
    {
        return monitorVideoMapper.selectMonitorVideoByVideoId(videoId);
    }

    /**
     * 查询监控视频列表
     * 
     * @param monitorVideo 监控视频
     * @return 监控视频
     */
    @Override
    public List<MonitorVideo> selectMonitorVideoList(MonitorVideo monitorVideo)
    {
        return monitorVideoMapper.selectMonitorVideoList(monitorVideo);
    }

    /**
     * 新增监控视频
     * 
     * @param monitorVideo 监控视频
     * @return 结果
     */
    @Override
    public int insertMonitorVideo(MonitorVideo monitorVideo)
    {
        monitorVideo.setCreateTime(DateUtils.getNowDate());
        return monitorVideoMapper.insertMonitorVideo(monitorVideo);
    }

    /**
     * 修改监控视频
     * 
     * @param monitorVideo 监控视频
     * @return 结果
     */
    @Override
    public int updateMonitorVideo(MonitorVideo monitorVideo)
    {
        return monitorVideoMapper.updateMonitorVideo(monitorVideo);
    }

    /**
     * 批量删除监控视频
     * 
     * @param videoIds 需要删除的监控视频主键
     * @return 结果
     */
    @Override
    public int deleteMonitorVideoByVideoIds(Integer[] videoIds)
    {
        return monitorVideoMapper.deleteMonitorVideoByVideoIds(videoIds);
    }

    /**
     * 删除监控视频信息
     * 
     * @param videoId 监控视频主键
     * @return 结果
     */
    @Override
    public int deleteMonitorVideoByVideoId(Integer videoId)
    {
        return monitorVideoMapper.deleteMonitorVideoByVideoId(videoId);
    }
}
